﻿using System.ComponentModel;
using ClientOverflow.ViewModels.Interfaces;

namespace ClientOverflow.ViewModels.QuestionViewViewModels
{
    /// <summary>
    /// NewAnswerViewModel is a view model with no backing model. This view model behaves like a controller
    /// with a placeholder for the new answer details. This view mode is observed by the PostNewAnswerCommand
    /// which creates an answer DTO and pass it to the server when the new answer is posted.
    /// </summary>
    internal class NewAnswerViewModel : INewAnswerViewModel
    {
        public event PropertyChangedEventHandler PropertyChanged = (sender, args) => { };

        private string content;
        public string Content
        {
            get { return content; }
            set
            {
                content = value;
                PropertyChanged(this, new PropertyChangedEventArgs("Content"));
            }
        }
    }
}